<?php 
require_once './database/Database.php';
require_once './GlobalSettings.php';

class Courseware
{
	private $Id;
	private $Course_Id;
	private $Teacher_Id;
	private $Status;//dicussed in readme.txt
	public $Url;
	public $Tempt_Url;
	public $Name;
	public $Key_Words;
	public $Summary;
	public $Grade;
	
	public $Resouces;
	public $Teacher;
	public $Course;
	
	//Read and instantiate the corresponding resourced in the databases, put them into the array $Resources
	private function getResources()
	{	
	}
	//Teachers Courses are not stored in the courseware table and not neccessarily presented, so call this funtion if needed
	private function getDetails()
	{}
	
	//put the courseware into the file system from temporary file and set the url
	private function save()
	{}
	
	function __get($name)
	{
		if ($name=="Url"&&"Url"==NULL)
		$this->save();
	}
	
	//$con = Database::getConnection();
}
?>